<?php /*
odd and even javascript
*/
//error_reporting(0); 
?>
<html>
<head>
<script type="text/javascript">
//document.write('even');
function check(){
var first = document.getElementById("first").value;
var second = document.getElementById("second").value;
var even_value = '';
var i=0;
var odd = '';
	 for(i=first; i<=second; i++)
	{
	//alert('test');
		if(i%2==0)
		{
		even_value = even_value+" ",+i;
		}
		else
		{
		odd = odd+" ",+i;
		}
	}
	//alert(even_value);
	//alert($odd);                                                                                               
document.getElementById("test").innerHTML = even_value;	
document.getElementById("test1").innerHTML = odd;	
//document.write(even_value);
//document.write(odd);
} 

</script>
</head>
<body>
<form action="ex3.php" method="post">
<input type="text" name="first" id="first" value=" "/>
<input type="text" name="second" id="second" value=" "/>
<input type="button" onclick="check(); return false;" value="find"/>
</form>
<div id="test"></div>
<div id="test1"></div>
</body>
<html>



